//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.ComponentModel;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Drawing;
			using System;
			using System.Resources;
			using System.Windows.Forms;
			using Utility;
			
		#endregion
		
	public class frmTimHoSoBenhAn : Form
	
	{
		
		#region Fields
			private BindingManagerBase bmb;
			private Button btExit;
			private Button btFirst;
			private Button btLast;
			private Button btSearch;
			public string CanNang;
			public string clr;
			public string clrISN;
			private IContainer components;
			private string connStr;
			private DataGrid dataGrid1;
			private Database_Com db;
			public string DiaChi;
			public string DienThoai;
			private DataSet ds;
			private DateTimePicker dtpDate;
			public int flag;
			public string GioiTinh;
			public string HuyetAp;
			public string ID;
			private ImageList imageList1;
			public string ISN;
			private Label label1;
			private Label label2;
			private Label label3;
			private Label lbSum;
			private Label lbTongSo;
			public string Mach;
			public string NgaySinh;
			public string NgheNghiep;
			public string NhanBiet;
			public string NhietDo;
			private RadioButton rbAll;
			private RadioButton rbID;
			private RadioButton rbTenBenhNhan;
			private TextBox tbGoTo;
			private TextBox tbKeySearch;
			public string Ten;
			private ToolTip toolTip1;
			public string Tuoi;
		#endregion
		
		#region Constructors
		
			public frmTimHoSoBenhAn ()
			
			{
				this.flag = 1;
				this.db = new Database_Com ();
				this.InitializeComponent ();
				this.connStr = Connection.ConnectionString ();
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void btExit_Click (object sender, EventArgs e)
			
			{
				base.Close ();
				return;
			}
			
			private void btFirst_Click (object sender, EventArgs e)
			
			{
				this.bmb.Position = 0;
				return;
			}
			
			private void btLast_Click (object sender, EventArgs e)
			
			{
				this.bmb.Position = (this.ds.Tables["vw_SearchPatient"].Rows.Count - 1);
				return;
			}
			
			private void btSearch_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				int i;
				int i2;
				SqlConnection theSqlConnection2;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet;
				frmLapHSBenhAnYTa theFrmLapHSBenhAnYTa;
				frmLapHoSoBenhAn theFrmLapHoSoBenhAn;
				int i3;
				int i4;
				theString = string.Empty;
				if (! this.rbAll.Checked)
				{
					goto L_01E4;
				}
				this.dtpDate.CustomFormat = "MM/dd/yyyy";
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter (string.Concat ("SELECT distinct patISN,patISN as STT, patID, patName, patBirthDate, patAddress, "
				+ "patSex FROM vw_SearchPatient where clrExaminationDate = \'", this.dtpDate.Text, "\'"), theSqlConnection);
				this.ds = new DataSet ();
				int i5 = theSqlDataAdapter.Fill (this.ds, "vw_SearchPatient");
				if ((this.ds != null) && ((this.ds.Tables.Count != 0) && (this.ds.Tables[0].Rows.Count != 0)))
				{
					goto L_00EB;
				}
				
			L_00A7:
				
				{
				}
				this.dataGrid1.DataSource = null;
				this.dtpDate.CustomFormat = "dd/MM/yyyy";
				DialogResult theDialogResult = MessageBox.Show ("Hi?n t?i kh?ng c? b?nh nh?n kh?m v?o ng?y n?y!", "Kh?ng t?m th?y b?nh nh?n", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.lbSum.Text = "";
				goto L_041D;
				
			L_00EB:
				
				{
				}
				this.dtpDate.CustomFormat = "dd/MM/yyyy";
				this.dataGrid1.Enabled = true;
				this.dataGrid1.DataSource = this.ds;
				this.dataGrid1.SetDataBinding (this.ds, "vw_SearchPatient");
				this.dataGrid1.ReadOnly = true;
				this.dataGrid1.TableStyles.Clear ();
				i = 0;
				goto L_0184;
				
			L_014E:
				
				{
				}
				this.ds.Tables["vw_SearchPatient"].Rows[i]["STT"] = (i + 1);
				i++;
				
			L_0184:
				
				{
				}
				if (i < this.ds.Tables["vw_SearchPatient"].Rows.Count)
				{
					goto L_014E;
				}
				this.loadDataGrid ();
				this.lbSum.Text = (i2 = this.ds.Tables["vw_SearchPatient"].Rows.Count).ToString ();
				goto L_041D;
				
			L_01E4:
				
				{
				}
				if (this.tbKeySearch.Text != "")
				{
					goto L_0213;
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Vui l?ng nh?p t? kho? ?? t?m ki?m!", "L?i t?m ki?m", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_041D;
				
			L_0213:
				
				{
				}
				theSqlConnection2 = new SqlConnection (this.connStr);
				if (! this.rbID.Checked)
				{
					goto L_0252;
				}
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat ("SELECT distinct patISN,patISN as STT, patID, patName, patBirthDate, patAddress, "
				+ "patSex FROM vw_SearchPatient WHERE patID=\'", this.tbKeySearch.Text, "\'"), theSqlConnection2);
				goto L_0275;
				
			L_0252:
				
				{
				}
				theSqlDataAdapter2 = new SqlDataAdapter (string.Concat ("Select distinct patISN,patISN as STT, patID, patName, patBirthDate, patAddress, "
				+ "patSex from vw_SearchPatient where patName like N\'%", this.tbKeySearch.Text, "%\'"), theSqlConnection2);
				
			L_0275:
				
				{
				}
				theDataSet = new DataSet ();
				int i6 = theSqlDataAdapter2.Fill (theDataSet, "vw_SearchPatient");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0339;
				}
				
			L_02B9:
				
				{
				}
				DialogResult theDialogResult3 = MessageBox.Show ("Kh?ng t?m th?y b?nh nh?n", "Th?ng B?o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.lbSum.Text = "";
				if (MessageBox.Show ("B?n c? mu?n l?p b?nh ?n m?i kh?ng?", "Th?ng B?o", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
				{
					goto L_0334;
				}
				if (UserInformation.usrRole != "2")
				{
					goto L_031C;
				}
				theFrmLapHSBenhAnYTa = new frmLapHSBenhAnYTa ();
				theFrmLapHSBenhAnYTa.ShowInTaskbar = false;
				DialogResult theDialogResult4 = theFrmLapHSBenhAnYTa.ShowDialog (((IWin32Window) this));
				goto L_0334;
				
			L_031C:
				
				{
				}
				theFrmLapHoSoBenhAn = new frmLapHoSoBenhAn ();
				theFrmLapHoSoBenhAn.ShowInTaskbar = false;
				DialogResult theDialogResult5 = theFrmLapHoSoBenhAn.ShowDialog (((IWin32Window) this));
				
			L_0334:
				
				{
				}
				goto L_041D;
				
			L_0339:
				
				{
				}
				this.dataGrid1.ReadOnly = true;
				this.dataGrid1.DataSource = theDataSet;
				this.dataGrid1.SetDataBinding (theDataSet, "vw_SearchPatient");
				this.dataGrid1.Enabled = true;
				this.dataGrid1.TableStyles.Clear ();
				this.loadDataGrid ();
				i3 = 0;
				goto L_03C1;
				
			L_038B:
				
				{
				}
				theDataSet.Tables["vw_SearchPatient"].Rows[i3]["STT"] = (i3 + 1);
				i3++;
				
			L_03C1:
				
				{
				}
				if (i3 < theDataSet.Tables["vw_SearchPatient"].Rows.Count)
				{
					goto L_038B;
				}
				this.lbSum.Text = (i4 = theDataSet.Tables["vw_SearchPatient"].Rows.Count).ToString ();
				theSqlDataAdapter2.Dispose ();
				theSqlConnection2.Close ();
				
			L_041D:
				return;
			}
			
			private void dataGrid1_MouseUp (object sender, MouseEventArgs e)
			
			{
				DataGrid.HitTestInfo theHitTestInfo;
				DataSet theDataSet;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet2;
				frmHoSoBenhAn theFrmHoSoBenhAn;
				frmYTaLapMoi theFrmYTaLapMoi;
				if (this.dataGrid1.DataSource == null)
				{
					goto L_0255;
				}
				
			L_0012:
				
				{
				}
				if (e.Button != MouseButtons.Left)
				{
					goto L_0255;
				}
				theHitTestInfo = this.dataGrid1.HitTest (e.X, e.Y);
				if (theHitTestInfo.Type != System.Windows.Forms.DataGrid.HitTestType.Cell)
				{
					goto L_0255;
				}
				this.dataGrid1.Select (theHitTestInfo.Row);
				if (MessageBox.Show ("B?n c? mu?n xem h? s? c?a b?nh nh?n n?y kh?ng?", "Xem h? s? b?nh nh?n", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
				{
					goto L_0255;
				}
				theDataSet = ((DataSet) this.dataGrid1.DataSource);
				if (theDataSet == null)
				{
					goto L_0255;
				}
				
			L_0088:
				
				{
				}
				this.ISN = theDataSet.Tables[0].Rows[theHitTestInfo.Row][0].ToString ();
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter (string.Concat ("SELECT * FROM vw_SearchClinicalRecord WHERE patISN=", this.ISN), theSqlConnection);
				theDataSet2 = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet2, "vw_SearchClinicalRecord");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables["vw_SearchClinicalRecord"].Rows.Count != 0)))
				{
					goto L_012C;
				}
				
			L_011C:
				
				{
				}
				this.NhanBiet = "0";
				goto L_01E3;
				
			L_012C:
				
				{
				}
				if ((theDataSet2.Tables["vw_SearchClinicalRecord"].Rows[0]["clrExaminationTimes"].ToString () != "") && (theDataSet2.Tables["vw_SearchClinicalRecord"].Rows[0]["clrExaminationTimes"].ToString () != string.Empty))
				{
					goto L_01D8;
				}
				
			L_019A:
				
				{
				}
				this.NhanBiet = "0";
				this.clrISN = theDataSet2.Tables["vw_SearchClinicalRecord"].Rows[0]["clrISN"].ToString ();
				goto L_01E3;
				
			L_01D8:
				
				{
				}
				this.NhanBiet = "1";
				
			L_01E3:
				
				{
				}
				if (UserInformation.usrRole != "1")
				{
					goto L_0220;
				}
				theFrmHoSoBenhAn = new frmHoSoBenhAn (this.clrISN, this.NhanBiet, this.ISN);
				theFrmHoSoBenhAn.ShowInTaskbar = false;
				DialogResult theDialogResult = theFrmHoSoBenhAn.ShowDialog (((IWin32Window) this));
				goto L_0249;
				
			L_0220:
				
				{
				}
				theFrmYTaLapMoi = new frmYTaLapMoi (this.clrISN, this.NhanBiet, this.ISN);
				theFrmYTaLapMoi.ShowInTaskbar = false;
				DialogResult theDialogResult2 = theFrmYTaLapMoi.ShowDialog ();
				
			L_0249:
				
				{
				}
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				
			L_0255:
				return;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				this.flag = 0;
				if (! disposing)
				{
					goto L_001D;
				}
				if (this.components == null)
				{
					goto L_001D;
				}
				this.components.Dispose ();
				
			L_001D:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void frmTimHoSoBenhAn_Load (object sender, EventArgs e)
			
			{
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				int i;
				int i2;
				DateTime theDateTime;
				this.dtpDate.Text = (theDateTime = DateTime.Now).ToString ();
				this.dtpDate.CustomFormat = "MM/dd/yyyy";
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlDataAdapter = new SqlDataAdapter (string.Concat ("SELECT  distinct patISN,patISN as STT, patID, patName, patBirthDate, patAddress,"
				+ " patSex FROM vw_SearchPatient where clrExaminationDate=\'", this.dtpDate.Text, "\'"), theSqlConnection);
				this.ds = new DataSet ();
				int i3 = theSqlDataAdapter.Fill (this.ds, "vw_SearchPatient");
				if ((this.ds != null) && ((this.ds.Tables.Count != 0) && (this.ds.Tables[0].Rows.Count != 0)))
				{
					goto L_00CB;
				}
				
			L_00AA:
				
				{
				}
				this.dataGrid1.Enabled = false;
				this.dtpDate.CustomFormat = "dd/MM/yyyy";
				goto L_01E5;
				
			L_00CB:
				
				{
				}
				this.dtpDate.CustomFormat = "dd/MM/yyyy";
				this.dataGrid1.Enabled = true;
				this.dataGrid1.TableStyles.Clear ();
				this.loadDataGrid ();
				this.dataGrid1.DataSource = this.ds;
				this.dataGrid1.SetDataBinding (this.ds, "vw_SearchPatient");
				i = 0;
				goto L_015E;
				
			L_0128:
				
				{
				}
				this.ds.Tables["vw_SearchPatient"].Rows[i]["STT"] = (i + 1);
				i++;
				
			L_015E:
				
				{
				}
				if (i < this.ds.Tables["vw_SearchPatient"].Rows.Count)
				{
					goto L_0128;
				}
				this.lbSum.Text = (i2 = this.ds.Tables["vw_SearchPatient"].Rows.Count).ToString ();
				this.bmb = this.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember];
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				
			L_01E5:
				return;
			}
			
			private void InitializeComponent ()
			
			{
				ResourceManager theResourceManager;
				Control[] theControlArray;
				this.components = ((IContainer) new System.ComponentModel.Container ());
				theResourceManager = new ResourceManager (typeof (frmTimHoSoBenhAn));
				this.label1 = new Label ();
				this.label2 = new Label ();
				this.rbID = new RadioButton ();
				this.rbTenBenhNhan = new RadioButton ();
				this.dataGrid1 = new DataGrid ();
				this.label3 = new Label ();
				this.tbKeySearch = new TextBox ();
				this.btSearch = new Button ();
				this.btExit = new Button ();
				this.rbAll = new RadioButton ();
				this.btFirst = new Button ();
				this.toolTip1 = new ToolTip (this.components);
				this.btLast = new Button ();
				this.tbGoTo = new TextBox ();
				this.dtpDate = new DateTimePicker ();
				this.lbTongSo = new Label ();
				this.lbSum = new Label ();
				this.imageList1 = new ImageList (this.components);
				((ISupportInitialize) this.dataGrid1).BeginInit ();
				base.SuspendLayout ();
				this.label1.Font = new System.Drawing.Font ("Verdana", 12F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label1.ForeColor = Color.MediumBlue;
				this.label1.Location = new Point (320, 16);
				this.label1.Name = "label1";
				this.label1.Size = new System.Drawing.Size (184, 23);
				this.label1.TabIndex = 0;
				this.label1.Text = "T?m H? S? B?nh ?n";
				this.label2.Location = new Point (184, 58);
				this.label2.Name = "label2";
				this.label2.Size = new System.Drawing.Size (72, 23);
				this.label2.TabIndex = 1;
				this.label2.Text = "T?m theo:";
				this.rbID.Location = new Point (256, 56);
				this.rbID.Name = "rbID";
				this.rbID.TabIndex = 2;
				this.rbID.Text = "S? ID";
				this.rbTenBenhNhan.Location = new Point (328, 56);
				this.rbTenBenhNhan.Name = "rbTenBenhNhan";
				this.rbTenBenhNhan.Size = new System.Drawing.Size (128, 24);
				this.rbTenBenhNhan.TabIndex = 3;
				this.rbTenBenhNhan.Text = "T?n b?nh nh?n";
				this.dataGrid1.BackgroundColor = SystemColors.ActiveCaptionText;
				this.dataGrid1.CaptionVisible = false;
				this.dataGrid1.DataMember = "";
				this.dataGrid1.HeaderForeColor = SystemColors.ControlText;
				this.dataGrid1.Location = new Point (16, 120);
				this.dataGrid1.Name = "dataGrid1";
				this.dataGrid1.ReadOnly = true;
				this.dataGrid1.Size = new System.Drawing.Size (824, 344);
				this.dataGrid1.TabIndex = 4;
				this.dataGrid1.MouseUp += new MouseEventHandler (this.dataGrid1_MouseUp);
				this.label3.Location = new Point (240, 89);
				this.label3.Name = "label3";
				this.label3.Size = new System.Drawing.Size (72, 23);
				this.label3.TabIndex = 5;
				this.label3.Text = "T? kh?a:";
				this.tbKeySearch.BorderStyle = BorderStyle.FixedSingle;
				this.tbKeySearch.Location = new Point (312, 88);
				this.tbKeySearch.Name = "tbKeySearch";
				this.tbKeySearch.Size = new System.Drawing.Size (184, 23);
				this.tbKeySearch.TabIndex = 6;
				this.tbKeySearch.Text = "";
				this.tbKeySearch.KeyPress += new KeyPressEventHandler (this.tbKeySearch_KeyPress);
				this.btSearch.FlatStyle = FlatStyle.Popup;
				this.btSearch.Location = new Point (504, 88);
				this.btSearch.Name = "btSearch";
				this.btSearch.TabIndex = 7;
				this.btSearch.Text = "T?m";
				this.btSearch.Click += new EventHandler (this.btSearch_Click);
				this.btExit.FlatStyle = FlatStyle.Popup;
				this.btExit.Location = new Point (760, 472);
				this.btExit.Name = "btExit";
				this.btExit.Size = new System.Drawing.Size (80, 23);
				this.btExit.TabIndex = 8;
				this.btExit.Text = "Tho?t";
				this.btExit.Click += new EventHandler (this.btExit_Click);
				this.rbAll.Checked = true;
				this.rbAll.Location = new Point (464, 56);
				this.rbAll.Name = "rbAll";
				this.rbAll.Size = new System.Drawing.Size (64, 24);
				this.rbAll.TabIndex = 9;
				this.rbAll.TabStop = true;
				this.rbAll.Text = "Ng?y";
				this.btFirst.FlatStyle = FlatStyle.Popup;
				this.btFirst.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btFirst.Image")));
				this.btFirst.Location = new Point (16, 472);
				this.btFirst.Name = "btFirst";
				this.btFirst.Size = new System.Drawing.Size (24, 23);
				this.btFirst.TabIndex = 10;
				this.toolTip1.SetToolTip (((Control) this.btFirst), "Di chuy?n ??n m?u tin ??u ti?n");
				this.btFirst.Click += new EventHandler (this.btFirst_Click);
				this.btLast.FlatStyle = FlatStyle.Popup;
				this.btLast.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btLast.Image")));
				this.btLast.Location = new Point (120, 472);
				this.btLast.Name = "btLast";
				this.btLast.Size = new System.Drawing.Size (24, 23);
				this.btLast.TabIndex = 11;
				this.toolTip1.SetToolTip (((Control) this.btLast), "Di chuy?n ??n m?u tin cu?i c?ng");
				this.btLast.Click += new EventHandler (this.btLast_Click);
				this.tbGoTo.BorderStyle = BorderStyle.FixedSingle;
				this.tbGoTo.Location = new Point (48, 472);
				this.tbGoTo.Name = "tbGoTo";
				this.tbGoTo.Size = new System.Drawing.Size (64, 23);
				this.tbGoTo.TabIndex = 12;
				this.tbGoTo.Text = "";
				this.tbGoTo.TextChanged += new EventHandler (this.tbGoTo_TextChanged);
				this.dtpDate.CustomFormat = "dd/MM/yyyy";
				this.dtpDate.Format = DateTimePickerFormat.Custom;
				this.dtpDate.Location = new Point (520, 56);
				this.dtpDate.Name = "dtpDate";
				this.dtpDate.Size = new System.Drawing.Size (103, 23);
				this.dtpDate.TabIndex = 16;
				this.lbTongSo.Font = new System.Drawing.Font ("Verdana", 9F, (FontStyle.Bold | FontStyle.Underline), GraphicsUnit.Point, ((byte) byte.MinValue));
				this.lbTongSo.ForeColor = Color.Blue;
				this.lbTongSo.Location = new Point (316, 472);
				this.lbTongSo.Name = "lbTongSo";
				this.lbTongSo.Size = new System.Drawing.Size (71, 16);
				this.lbTongSo.TabIndex = 39;
				this.lbTongSo.Text = "T?ng s? :";
				this.lbSum.Font = new System.Drawing.Font ("Verdana", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.lbSum.ForeColor = Color.Brown;
				this.lbSum.Location = new Point (384, 472);
				this.lbSum.Name = "lbSum";
				this.lbSum.Size = new System.Drawing.Size (71, 16);
				this.lbSum.TabIndex = 40;
				this.imageList1.ColorDepth = ColorDepth.Depth8Bit;
				this.imageList1.ImageSize = new System.Drawing.Size (20, 20);
				this.imageList1.ImageStream = ((ImageListStreamer) theResourceManager.GetObject ("imageList1.ImageStream"));
				this.imageList1.TransparentColor = Color.Transparent;
				this.AutoScaleBaseSize = new System.Drawing.Size (7, 16);
				base.ClientSize = new System.Drawing.Size (850, 504);
				theControlArray = new Control[16];
				theControlArray[0] = ((Control) this.lbSum);
				theControlArray[1] = ((Control) this.lbTongSo);
				theControlArray[2] = ((Control) this.tbKeySearch);
				theControlArray[3] = ((Control) this.dtpDate);
				theControlArray[4] = ((Control) this.tbGoTo);
				theControlArray[5] = ((Control) this.btLast);
				theControlArray[6] = ((Control) this.btFirst);
				theControlArray[7] = ((Control) this.rbAll);
				theControlArray[8] = ((Control) this.btExit);
				theControlArray[9] = ((Control) this.btSearch);
				theControlArray[10] = ((Control) this.label3);
				theControlArray[11] = ((Control) this.dataGrid1);
				theControlArray[12] = ((Control) this.rbTenBenhNhan);
				theControlArray[13] = ((Control) this.rbID);
				theControlArray[14] = ((Control) this.label2);
				theControlArray[15] = ((Control) this.label1);
				base.Controls.AddRange (theControlArray);
				this.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
				base.Icon = ((System.Drawing.Icon) theResourceManager.GetObject ("$this.Icon"));
				base.MaximizeBox = false;
				base.MinimizeBox = false;
				base.Name = "frmTimHoSoBenhAn";
				base.StartPosition = FormStartPosition.CenterScreen;
				this.Text = "T?m H? S? B?nh ?n";
				base.Load += new EventHandler (this.frmTimHoSoBenhAn_Load);
				((ISupportInitialize) this.dataGrid1).EndInit ();
				base.ResumeLayout (false);
				return;
			}
			
			public bool IsNumber (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					long theLong = long.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			public void loadDataGrid ()
			
			{
				DataGridTableStyle theDataGridTableStyle;
				DataGridTextBoxColumn theDataGridTextBoxColumn;
				DataGridTextBoxColumn theDataGridTextBoxColumn2;
				DataGridTextBoxColumn theDataGridTextBoxColumn3;
				DataGridTextBoxColumn theDataGridTextBoxColumn4;
				DataGridTextBoxColumn theDataGridTextBoxColumn5;
				DataGridTextBoxColumn theDataGridTextBoxColumn6;
				DataGridTextBoxColumn theDataGridTextBoxColumn7;
				this.dataGrid1.CaptionText = "Danh S?ch Nh?n Vi?n";
				theDataGridTableStyle = new DataGridTableStyle ();
				theDataGridTableStyle.MappingName = "vw_SearchPatient";
				theDataGridTableStyle.AlternatingBackColor = Color.AliceBlue;
				theDataGridTableStyle.HeaderForeColor = Color.Maroon;
				theDataGridTableStyle.GridLineColor = Color.CornflowerBlue;
				theDataGridTableStyle.AllowSorting = false;
				theDataGridTextBoxColumn = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn.MappingName = "patISN";
				theDataGridTextBoxColumn.HeaderText = "";
				theDataGridTextBoxColumn.Width = 0;
				int i = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn));
				theDataGridTextBoxColumn2 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn2.MappingName = "STT";
				theDataGridTextBoxColumn2.HeaderText = " STT";
				theDataGridTextBoxColumn2.Width = 50;
				int i2 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn2));
				theDataGridTextBoxColumn3 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn3.MappingName = "patID";
				theDataGridTextBoxColumn3.HeaderText = "S? ID";
				theDataGridTextBoxColumn3.Width = 60;
				int i3 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn3));
				theDataGridTextBoxColumn4 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn4.MappingName = "patName";
				theDataGridTextBoxColumn4.HeaderText = "T?n B?nh Nh?n";
				theDataGridTextBoxColumn4.Width = 220;
				int i4 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn4));
				theDataGridTextBoxColumn5 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn5.MappingName = "patBirthDate";
				theDataGridTextBoxColumn5.HeaderText = "Ng?y Sinh";
				theDataGridTextBoxColumn5.Width = 90;
				int i5 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn5));
				theDataGridTextBoxColumn6 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn6.MappingName = "patAddress";
				theDataGridTextBoxColumn6.HeaderText = "??a Ch?";
				theDataGridTextBoxColumn6.Width = 200;
				int i6 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn6));
				theDataGridTextBoxColumn7 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn7.MappingName = "patSex";
				theDataGridTextBoxColumn7.HeaderText = "Gi?i t?nh";
				theDataGridTextBoxColumn7.Width = 81;
				int i7 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn7));
				int i8 = this.dataGrid1.TableStyles.Add (theDataGridTableStyle);
				return;
			}
			
			private void tbGoTo_TextChanged (object sender, EventArgs e)
			
			{
				int i;
				if (! this.IsNumber (this.tbGoTo.Text.ToString ()))
				{
					goto L_009B;
				}
				i = 0;
				goto L_0077;
				
			L_001F:
				
				{
				}
				if (this.ds.Tables["vw_SearchPatient"].Rows[i]["patID"].ToString () != this.tbGoTo.Text.ToString ())
				{
					goto L_0073;
				}
				this.bmb.Position = i;
				goto L_0099;
				
			L_0073:
				
				{
				}
				i++;
				
			L_0077:
				
				{
				}
				if (i < this.ds.Tables["vw_SearchPatient"].Rows.Count)
				{
					goto L_001F;
				}
				
			L_0099:
				
				{
				}
				goto L_00A6;
				
			L_009B:
				
				{
				}
				this.tbGoTo.SelectAll ();
				
			L_00A6:
				return;
			}
			
			private void tbKeySearch_KeyPress (object sender, KeyPressEventArgs e)
			
			{
				if (e.KeyChar != '\r')
				{
					goto L_0012;
				}
				this.btSearch_Click (sender, ((EventArgs) e));
				
			L_0012:
				return;
			}
			
			private void txtBalance_KeyPress (object sender, KeyPressEventArgs e)
			
			{
				e.Handled = true;
				return;
			}
			
		#endregion
	}
	
}

